/* @(#) somx/readme 2.7 1/20/94 09:46:55 [5/15/94 17:58:13] */

/*
 * 96F8647, 96F8648, 96F8850 (C) Copyright IBM Corp. 1992, 1994
 * All Rights Reserved
 * Licensed Materials - Property of IBM
 *
 * DISCLAIMER OF WARRANTIES.
 * The following [enclosed] code is sample code created by IBM
 * Corporation. This sample code is not part of any standard or IBM
 * product and is provided to you solely for the purpose of assisting
 * you in the development of your applications.  The code is provided
 * "AS IS". IBM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
 * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE, REGARDING THE FUNCTION OR PERFORMANCE OF
 * THIS CODE.  IBM shall not be liable for any damages arising out of
 * your use of the sample code, even if they have been advised of the
 * possibility of such damages.
 *
 * DISTRIBUTION.
 * This sample code can be freely distributed, copied, altered, and
 * incorporated into other software, provided that it bears the above
 * Copyright notice and DISCLAIMER intact.
 */


      *** IMPORTANT: YOU MUST READ AND FOLLOW THE DIRECTIONS IN  ***
      *** THIS FILE IN ORDER TO CORRECTLY BUILD AND RUN THE DSOM ***
      *** SAMPLES.                                               ***


PREPARING TO BUILD AND RUN THE DSOM SAMPLES
===========================================

These samples require that you have already set up the SOM environment
variables using somenv.cmd.  In addition, you must run somdenv.cmd
to set up the DSOM environment variables.  The DSOM command file is
located in this directory.

The samples in the "c" subdirectory require that you have built the
strict CORBA-compliant C bindings for the SOM toolkit.  These bindings
are produced by running the "somcorba" command.  You should also
verify that the SMADDSTAR environment variable is undefined.

The samples in the "cpp" subdirectory also require the strict CORBA-
compliant C bindings and SMADDSTAR to be undefined.  In addition,
they require that you have built the C++ .xh files.  These files are
produced by running the "somxh" command.

BUILDING A DSOM SAMPLE
======================

Makefiles are provided in each sample subdirectory.  Enter "wmake /f makefile.wmk" to
compile all necessary IDL files, update the Implementation Repository
and build all necessary dlls and executables.

RUNNING A DSOM SAMPLE
=====================

To run a sample, you must first start the DSOM daemon, "somdd", in the
background or in a separate OS/2 command window.  Because the samples build
DSOM servers, dynamically loadable libraries and Interface Repository data
into the current directory, you must start somdd and any DSOM servers from the
directory in which the sample was built.

To start somdd in the separate window, enter:

   "start /F /C somdd"

As you move from one DSOM sample to the next, you must terminate the DSOM
daemon and the DSOM servers that are running for the first sample and restart
them from the next sample's directory.  Refer to "Cleaning Up After Running a
DSOM Sample" below.

Review the README files in the sample subdirectories for additional
instructions.

CLEANING UP AFTER RUNNING A DSOM SAMPLE
=======================================

To stop the DSOM daemon and the server it started, press Ctrl/Esc to bring
up the task list and select the task "somdd.exe" with the right mouse button
then select close with the left mouse button.

After you terminate the DSOM daemon, enuser that the DSOM server that the
sample uses has been terminated by again pressing Ctrl/Esc to view the
task list. Terminate a DSOM server in the same way as the DSOM daemon.

You may also press Ctrl-c in a window running the DSOM daemon or a DSOM
server.

Enter "wmake /f makefile.wmk clean" to clean up a sample directory by
removing unnecessary files.

OVERVIEW OF DSOM SAMPLES
========================

The c/sompserv subdirectory contains the source for:

  sompserv - the sample server object, SOMPServer, which is described
             in the toolkit documentation

  somptest - a sample client which uses the server object and some
             client persistent objects

The c/animal and cpp/animal subdirectories contains the source for:

  testsvr - a simple generic server which uses the SOM Object Adapter
            to automatically load class libraries and execute requests
            on objects instantiated in the server

  anitest - a sample client program which uses static bindings to invoke
            methods on remote objects

The c/dii and cpp/dii subdirectories contains the source for:

  diitest - a sample client program which uses the Dynamic Invocation
            Interface (DII) to invoke a method on a remote object

The c/stack subdirectory contains the source for:

  client  - a sample client program which uses a simple Stack
            class implementation. The client program is the same one
            explained in the SOMobjects Developer Toolkit Users Guide
            (Chapter 6)

